package com.wt.admin.mapper.ai;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wt.admin.domain.dto.ai.ModelConfigDTO;
import com.wt.admin.domain.entity.ai.ModelConfigEntity;
import com.wt.admin.domain.vo.ai.ModelConfigVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface ModelConfigMapper extends BaseMapper<ModelConfigEntity> {

    IPage<ModelConfigVO> configList(Page<ModelConfigDTO> page, @Param("data") ModelConfigDTO data);

    @Select("select * from ai_model_config")
    List<ModelConfigVO> configAll();

    @Select("select * from ai_model_config where id = #{chatModel} ")
    ModelConfigEntity findById(@Param("chatModel") Integer chatModel);
}
